import Vue from "vue";
import Vuex from "vuex";

Vue.use(Vuex);

export default new Vuex.Store({
    state: {
        address: "北京",
        userInfo: {},
        userId: null,
    },
    mutations: {
        changeAddress(state, data) {
            state.address = data;
        },
        save_userInfo(state, data) {
            state.userInfo = data;
        },
        save_userId(state, data) {
            state.userId = data;
        },
    },
    actions: {},
    modules: {},
});